from core.basehandler import BaseHandler
from core.room import Room
from items.Bowlcut import BowlCut
from items.HansSoloCut import HansSoloCut
from core.action import Action


class salon(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        
        # add inventory items
        self.add_item(BowlCut())
        self.add_item(HansSoloCut())
        
        # build list of actions
        self.add_action(Out)    
    # return description of room.
    def get_description(self):
        return '''
        You usually cuts his own hair but your arms can't reach the back of your head.  \n 
        Mullets are not currently in style in Kyrgyzstan. \n
        Given your limited budget, you can only to go to SuperAverageCuts, a barber school.  \n
        What haircut should you request?
        '''
    # return image of room
    def get_image(self):
        return 'chewbacca.gif'


class SalonAreaHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return salon

# define actions for this room

class Out(Action):
    def __init__(self):
        Action.__init__(self, "Out")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go to community college"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'college'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"